{ config, pkgs, ... }:

{
  imports =
    [ 
      ./hardware-configuration.nix
    ];

  boot.loader.grub.enable = true;
  boot.loader.grub.version = 2;
  boot.loader.grub.device = "/dev/sda"; 
  boot.kernelPackages = pkgs.linuxPackages-libre;

  networking.hostName = "mango"; 
  networking.networkmanager.enable = true;

  networking.useDHCP = false;
  networking.interfaces.enp0s25.useDHCP = true;
  networking.interfaces.wlp2s0.useDHCP = true;

  time.timeZone = "America/New_York";

  nixpkgs.config.allowUnfree = true;

  environment.systemPackages = with pkgs; [

    wget 
    vim 
    visidata 
    emacs
    git 
    rsync
    exa
    tokei 
    pass
    nnn 
    fzf
    ripgrep
    tmux

  ];


  users.users.ccart.packages = with pkgs; [

    ardour
    audacity
    abcm2ps
    chromium
    evince
    firefox
    google-chrome
    gomuks 
    libreoffice
    lilypond-unstable
    mpv
    puredata
    sox
    sxiv
    ffmpeg
    inkscape
    youtube-dl 
    racket-minimal
    wire-desktop 

  ];

  services.openssh.enable = false;

  services.printing.enable = true;

  sound.enable = true;
  hardware.pulseaudio.enable = true;

  services.xserver.enable = true;
  services.xserver.layout = "us";
  services.xserver.autorun = true;

  services.xserver.displayManager.sddm.enable = true;
  services.xserver.displayManager.sddm.autoLogin.enable = true;
  services.xserver.displayManager.sddm.autoLogin.user = "ccart";
  services.xserver.desktopManager.xfce.enable = true;

  users.users.ccart = {
    isNormalUser = true;
    uid = 1000;
    home = "/home/ccart";
    password = "nixos";
    description = "Boo Bar";
    extraGroups = [ "wheel" "video" "audio" "disk" "networkmanager" ]; 
  };

  system.stateVersion = "20.03"; 

}

